package demo06233;

public class Employee {

        private String employeeId;
        private String name;
        private String department;
        private int age;
        private String gender;
        private String phone;


        public Employee() {
            System.out.println("无参构造方法被调用");
        }

        // 有参构造
        public Employee(String employeeId, String name, String department,
                        int age, String gender, String phone) {
            this.employeeId = employeeId;
            this.name = name;
            this.department = department;
            this.age = age;
            this.gender = gender;
            this.phone = phone;
            System.out.println("有参构造方法被调用");
        }


        public String getEmployeeId() {
            return employeeId;
        }

        public void setEmployeeId(String employeeId) {
            this.employeeId = employeeId;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getDepartment() {
            return department;
        }

        public void setDepartment(String department) {
            this.department = department;
        }

        public int getAge() {
            return age;
        }

        public void setAge(int age) {
            this.age = age;
        }

        public String getGender() {
            return gender;
        }

        public void setGender(String gender) {
            this.gender = gender;
        }

        public String getPhone() {
            return phone;
        }

        public void setPhone(String phone) {
            this.phone = phone;
        }


        public void displayInfo() {
            System.out.println("\n=== 职工信息 ===");
            System.out.println("工号: " + employeeId);
            System.out.println("姓名: " + name);
            System.out.println("部门: " + department);
            System.out.println("年龄: " + age);
            System.out.println("性别: " + gender);
            System.out.println("联系方式: " + phone);
        }
    }